home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_dlog_sprockets.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  89 lines

  1. # Jones 3D Cog Script
  2. #
  3. # shs_Dlog_sprokets.cog   Say the line, Indy.  
  4. #
  5. # [JWC]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13. message     startup
  14. message     crossed
  15.                                                           
  16.  
  17. sound        in_moresprockets=Ss04j03.wav            local
  18.  
  19. surface     trigger
  20.  
  21. thing        player                    local
  22. thing          cam1spot                nolink
  23. thing           cam1look                nolink
  24. thing        offsetcam                  nolink
  25. thing        offsettarg               nolink
  26.  
  27. flex        viewangle                local
  28.  
  29.  
  30. int            played=0                local
  31.  
  32. end
  33.  
  34. # ========================================================================================
  35.  
  36. code
  37.  
  38. startup:
  39.     
  40.           
  41.     player = GetLocalPlayerThing();
  42.       return;
  43.  
  44.  
  45. crossed:
  46.     
  47.     if ((GetSenderRef() == trigger) && (played == 0)) 
  48.     {
  49.         MakeMeStop();
  50.         StartCutscene(1);
  51.         
  52.         # Camera stuff
  53.         StartCutscene(0);
  54.         MakeCamera2LikeCamera1(cam1spot, cam1look);
  55.         SetCameraLookInterp(2, 0);            # kill pan & tilt to lock on 2nd target
  56.           SetCameraPosInterp(2, 0);            # kill dolly mode too
  57.         SetCameraFocus(2, cam1spot);        # cam 2 takes over here
  58.         SetCameraSecondaryFocus(2, cam1look); #looking same place
  59.         viewangle = GetCameraFOV(); # it pays to be careful
  60.         SetCurrentCamera(2);
  61.         SetCameraFOV(viewangle, 0, 0.0); # start here anyway
  62.         SetCameraLookInterp(2, 1);             
  63.         SetCameraPosInterp(2, 1);
  64.         SetCameraInterpSpeed(2, 0.7); # about right
  65.         Sleep(0.01);
  66.         SetCameraFocus(2, offsetcam);  # slide out to new spot
  67.         SetCameraSecondaryFocus(2, offsettarg);    # slide over to new target
  68.         sleep(.5);
  69.  
  70.         # "This thing has more..."
  71.         PlayVoice(player, in_moresprockets, 1.0, 1);
  72.         
  73.         played=1; 
  74.         SetCameraLookInterp(2, 0); # kill pan & tilt mode
  75.         SetCameraPosInterp(2, 0); # kill dolly mode
  76.         SetCameraPosition(1, GetThingPos(offsetcam)); # prep to swing back to follow-cam
  77.         sleep(.01);
  78.         SetCurrentCamera(1);
  79.         
  80.         ClearActorFlags(player, 0x200000); # player in control
  81.         EndCutscene();
  82.     }
  83.     
  84. return;
  85.      
  86.   
  87.  
  88. end
  89.